<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>选择钥匙有效期</title>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="renderer" content="webkit">
    <link href="${pageContext.request.contextPath}/static/css/common.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/bootstrap-3.3.5/css/bootstrap.min.css"
          rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/font-awesome-4.3.0/css/font-awesome.min.css"
          rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/select2-4.0.0/dist/css/select2.min.css"
          rel="stylesheet"/>

    <script src="${pageContext.request.contextPath}/static/js/jquery-1.11.3.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/plugins/bootstrap-3.3.5/js/bootstrap.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/plugins/select2-4.0.0/dist/js/select2.min.js"></script>
	<script type="text/javascript"
            src="${pageContext.request.contextPath}/static/plugins/My97DatePicker/WdatePicker.js"></script>
</head>
<body>
<div class="col-sm-12">
    <form class="form-horizontal m-t" >
        <div class="form-group">
            <label class="col-sm-3  control-label" style="float: left;"><i class="require">*</i>钥匙日期:</label>
                 <div class="div2 input-group">
                     <input class="form-control" name="validity" id='validity'  style="width: 185px;"
                            onclick='WdatePicker()'/>
                 </div>
                 <a id="sure" onclick="sure()" hidden="true">确定</a>
         </div>
         
    </form>
</div>
<script type="text/javascript">
$(document).ready(
    function () {
    	 var date = new Date();
         var seperator1 = "-";
         var year = date.getFullYear()+1;
         var month = date.getMonth() + 1;
         var strDate = date.getDate();
         if (month >= 1 && month <= 9) {
             month = "0" + month;
         }
         if (strDate >= 0 && strDate <= 9) {
             strDate = "0" + strDate;
         }
         var currentdate = year + seperator1 + month + seperator1 + strDate;
         $("#validity").val(currentdate);
 })
  function sure(){
       var validity = $("#validity").val();
       $(window.parent.$("#validity").val(validity)); 
   }
 
</script>
</body>
</html>
